1. Field of the Invention
The invention relates to computer graphics, and more particularly to the gamma correction of color coordinates.
2. Related Art
In the field of computer graphics the color display process must contend with the fact that display of a color""s brightness is typically nonlinear, relative to an input of varying color coordinate values to a graphics display device. In a physical sense, color coordinate values are sent to a graphics display device in the form of electrical signals. Such an electrical signal (known hereinafter as an input signal) can, for example, be a digital signal representing a color coordinate value, or an analog signal having a particular voltage level that corresponds to a color coordinate value. If the relationship between the input signal and displayed brightness were linear, then it would be a straightforward problem to determine the proper color coordinate value to achieve a certain brightness. Because of the nonlinearity in the response of graphics display devices, it becomes difficult to determine the appropriate input signal. An exemplary graph illustrating the nonlinearity is shown in FIG. 1. The relationship between the value represented by input signal 104 and brightness 106 is shown as a nonlinear function 102, where brightness 106 varies from minimum brightness 108 to maximum brightness 110.
The solution to this problem is a process known as gamma correction. In a gamma correction process the voltage input to a graphics display is controlled so as to produce the intended color. The conventional approach to gamma correction involves a plurality of lookup tables.
Given a typical color representation having three distinct color coordinates, three lookup tables are required. If, for example, colors are being represented in a red/green/blue (RGB) color space, the color of any given pixel is represented by three coordinates, a red coordinate, a green coordinate, and a blue coordinate. In a conventional approach to gamma correction, there are three corresponding lookup tables, one lookup table for the red coordinate, one lookup table for the green coordinate, and one lookup table for the blue coordinate. A lookup table for a given color coordinate lists each possible value for the color coordinate. For each value of a color coordinate there is an associated input signal. The input signal is chosen so that when it is input to a graphics display device, the brightness indicated by the associated color coordinate is displayed accurately.
The lookup table process can be integrated into the output processing of a frame buffer as follows. A given pixel is read from the frame buffer. The red coordinate of the pixel is used to access the red lookup table. Likewise the green and blue color coordinates of that pixel are used to access the green and blue lookup tables respectively. As a result, for each pixel, three input signals are determined from these three lookup tables. The input signals are then sent to the graphics display device, which produces the intended color.
An example lookup table is illustrated in FIG. 2. Gamma correction lookup table 200 maps color coordinate values 202 to input signals. In this example, input signals are represented as voltage levels 204. The brightness indicated by a color coordinate is achieved by sending the corresponding voltage level to the graphics display device. For illustrative purposes, color coordinate values 202A through 202n are shown as 8-bit values, expressed in hexadecimal. Actual graphics systems may use longer or shorter color coordinate values. Voltage values are shown as 204A through 204n. 
There are a number of shortcomings with this approach. First, the process of loading lookup tables into a frame buffer can be time consuming. As described above, three lookup tables are necessary. If each color coordinate is represented by eight bits, then each table must necessarily consist of 256 entries. It is not uncommon, however, for current computer graphics applications to represent color coordinates by as many as 24 bits. As a result, the lookup tables become sizable. The process of loading the lookup tables therefore becomes time consuming. Second, in light of the potentially large size of every lookup table, significant amounts of memory are necessary. The design of a frame buffer must therefore account for significant amounts of memory when a lookup table architecture is used.
A system and method of performing gamma correction is needed where lookup tables are not required. Such an alternative system and method must be practical to implement. It should not include a time consuming loading process, nor should it require significant amounts of memory.
The invention comprises a system and method of gamma correction of pixel color coordinates by direct calculation. The invention models the response characteristics of a graphics display device to produce a set of transformation functions. The parameters that describe the transformation functions are then sent to a transformation unit. To display a pixel, the transformation unit evaluates the transformation functions, using the color coordinates of the pixel as inputs. This produces transformed pixel color coordinates. The transformed pixel color coordinates are then sent to the graphics display device. The pixel can then be displayed with its originally intended color.
The invention described herein has the feature of performing gamma correction by direct calculation of transformation functions, instead of using lookup tables to obtain gamma-corrected color coordinates. The invention has the additional feature of being implemented in either hardware, software, or a combination thereof.
The invention has the advantage of requiring a short time to load necessary data. The time needed to load transformation function description parameters is less than the time required to load lookup tables, because transformation function description parameters represents less data than lookup tables. For this same reason, the invention has the further advantage of requiring less memory. While lookup tables require significant amounts of memory, the invention described herein requires memory only for a relatively small number of transformation function description parameters.
Further features and advantages of the invention as well as the operation of various embodiments of the present invention are described in detail below with reference to the accompanying drawings.